var gulp = require('gulp'),
    less = require('gulp-less'),
    browserSync = require('browser-sync');
    watch = require('gulp-watch');

gulp.task('less', function() {
   gulp.src('less/*.less')
      .pipe(less())
      .pipe(gulp.dest('css'));
});

gulp.task('watch', function () {
   gulp.watch('less/*.less', ['less']);
});

gulp.task('browser-sync', function () {
   var files = [
      './**/*.html',
      './css/**/*.css',
      './imgs/**/*.png',
      './js/**/*.js'
   ];

   browserSync.init(files, {
      server: {
         baseDir: '.'
      }
   });
});

gulp.task("default", ['watch', 'browser-sync']);